const { default: mongoose ,Schema} = require('mongoose')

const carSchema = new Schema({
    name:{
        type:String,
        required:true
    },
    brand:{
        type:String,
        required:true
    },
    VIN:{
        type:String,
        unique:true
    },
    price:{
        type:Number,
        enum:[10.99,11.99,12.99,12.59,13.99]
    }
})

const CarModel = mongoose.model('car',carSchema)

module.exports = CarModel